package com.leonzhangxf.guice.bill;

import com.leonzhangxf.guice.bill.domain.ChargeResult;

/**
 * A transaction log could log charge result to a destination.
 *
 * @author leonzhangxf
 */
public interface TransactionLog {

    /**
     * Log the charge result when goes ok.
     *
     * @param result the charge result.
     */
    void logChargeResult(ChargeResult result);

    /**
     * Log the exception message when goes wrong.
     *
     * @param ex the exception when charge goes wrong.
     */
    void logConnectException(UnreachableException ex);
}
